/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.doc.utility;

import java.awt.Desktop;
import java.io.File;

/**
 *
 * @author Administrator
 */
public class Utility {
    
    public static void openFiles(String file){
        try {

            File pdfFile = new File(file);
            if (pdfFile.exists()) {

                if (Desktop.isDesktopSupported()) {
                    Desktop.getDesktop().open(pdfFile);
                } else {
                    //System.err.println("Awt Desktop is not supported!");
                }

            } else {
                //System.err.println("File is not exists!");
            }

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
    
    
    public static void main(String[] args) {
        String a = "D";
        
        String b = (a == "H") ? "Hai" : "Loan";
        
        System.out.println("b:"+b);
    }
    
}
